home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Information / WebSites / Wirenet / files / FixMDgroups0.lha / FixMDgroups
Text File  |  1998-09-28  |  758b  |  34 lines

  1. /* */
  2.  
  3. options results
  4.  
  5. groupfile = 'NetConnect2:Programs/MicroDot-II/Data/Grouplist'
  6. tempfile = 'NetConnect2:Programs/MicroDot-II/Data/FixMDGroups.'time(s)
  7.  
  8. if ~open(in,groupfile,'R') then call ExitMsg('Failed to open' groupfile)
  9. if ~open(out,tempfile,'W') then call ExitMsg('Failed to create temporary group file')
  10.  
  11. do until eof(in)
  12.     group = readln(in)
  13.     if group = '' then iterate
  14.     call writeln(out,trim(group)'   ')
  15.     end
  16.  
  17. call close(in)
  18. call close(out)
  19.  
  20. address command
  21. if ~rename(groupfile,groupfile'.old') then call ExitMsg('File rename failure')
  22. if ~rename(tempfile,groupfile) then call ExitMsg('File rename failure')
  23. call delete(tempfile)
  24. call delete(groupfile'.old')
  25. exit
  26.  
  27. ExitMsg:
  28.     parse arg msg
  29.     say
  30.     say msg
  31.     say
  32.     exit
  33.  
  34.